﻿using UnityEngine;

namespace Manox.Libs.MVC
{
    /// <summary>
    /// Controller.
    /// </summary>
    public abstract class Controller<T> : ControllerBase where T : Model
    {
        /// <summary>Model.</summary>
        [HideInInspector]
        public T Model;



        /// <summary>
        /// Set model.
        /// </summary>
        /// <param name="model"></param>
        public override void SetModel(Model model)
        {
            this.SetModel((T)model);
        }

        /// <summary>
        /// Set model.
        /// </summary>
        /// <param name="model"></param>
        public void SetModel(T model)
        {
            this.Model = model;
        }

        /// <summary>
        /// Fixed update.
        /// </summary>
        public override void FixedUpdate()
        {
            base.FixedUpdate();        
        }         
    }
}
